package GUI;

import javax.swing.*;
import java.awt.*;
/**
 * This class creates instance of loginPanel	
 * to display when needed
 * @author Elad
 *
 */
public class Login extends JPanel{
	private static final long serialVersionUID = 1L;
	private JTextArea textArea;
	private JTextArea textArea1;
	private JButton canButton;
	private JButton subButton;
	
	/**
	 * the constructor
	 */
	public Login() {
		super();
		textArea = new JTextArea();
		textArea1 = new JTextArea();
		subButton = new JButton("submit");
		canButton = new JButton("cancel");		
		initialize();
		}
	
	/**
	 * This method initializes loginPanel
	 */
	public void initialize(){
		JLabel lblLogInWindow = new JLabel("LOG IN window");
		lblLogInWindow.setForeground(Color.BLUE);
		lblLogInWindow.setFont(new Font("Arial Black", Font.BOLD, 17));
		lblLogInWindow.setBounds(162, 31, 247, 50);
		add(lblLogInWindow);
		
		JLabel lblUserName = new JLabel("User Name:");
		lblUserName.setFont(new Font("Arial", Font.BOLD, 13));
		lblUserName.setBounds(23, 78, 86, 50);
		add(lblUserName);
		
		textArea.setBounds(139, 84, 207, 40);
		add(textArea);
		textArea.setColumns(10);
		
		JLabel lblPassword = new JLabel("Password:");
		lblPassword.setFont(new Font("Arial", Font.BOLD, 13));
		lblPassword.setBounds(23, 138, 81, 60);
		add(lblPassword);
		
		textArea1.setBounds(139, 149, 207, 40);
		add(textArea1);
		textArea1.setColumns(10);
		
		subButton.setFont(new Font("Arial", Font.PLAIN, 12));
		subButton.setBounds(284, 218, 122, 40);
		add(subButton);
		
		canButton.setFont(new Font("Arial", Font.PLAIN, 12));
		canButton.setBounds(33, 218, 122, 40);
		add(canButton);
		
		setLayout(null);
		setSize(new Dimension(500, 300));	
	}
	
	/**
	 * 
	 * @return JTextArea with the user name
	 */
	public JTextArea getTextArea_userName(){
		return textArea;
	}
	/**
	 * 
	 * @param text to set the user-name textArea
	 */
	public void setTextArea_userName(String text){
		textArea.setText(text);
	}
	/**
	 * 
	 * @return JTextArea with the password
	 */
	public JTextArea getTextArea_password() {	
		return textArea1;
	}
	/**
	 * 
	 * @param text1 to set the password textArea
	 */
	public void setTextArea_password(String text1){
		textArea1.setText(text1);
	}
	/**
	 * 
	 * @return the submit button
	 */
	public JButton getSubButt(){
		return subButton;
	}
	/**
	 * 
	 * @return the cancel button
	 */
	 JButton geCanButt(){
		return canButton;
	}
	
}
	